import {ref} from 'vue'
let flag = ref(true)

const mySwitch = () => {
    const pre_box = document.querySelector('.pre-box')
    const img = document.querySelector('.img-box>img')
    if (flag.value) {
        pre_box.style.transform = 'translateX(100%)'
        pre_box.style.background = '#5CA7ED'
    } else {
        pre_box.style.background = '#96C5F0'
        pre_box.style.transform = 'translateX(0%)'
    }
    flag.value = !flag.value
}

export default mySwitch